home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
education
/
pe048.dms
/
pe048.adf
/
SIMON
/
Simon.Bak
/
Simon.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1991-01-20
|
3KB
|
110 lines
Screen Open 0,320,200,16,Lowres
Locate 5,2 : Print "DO YOU WANT INSTRUCTIONS."
Locate 5,4 : Print "TYPE Y or N THEN HIT RETURN."
Input A$
If A$="y" Then INST
Load Iff "simon:simon.iff",1
Load "simon:samples.abk"
SP$=" "
Global R,A,VAR$,M,H,K$,X1,Y1,SP$,X
Dim ARRAY$(20)
Shared ARRAY$()
Dim VAR$(20)
Shared VAR$()
SC=10
STAR:
A=0 :
Paper 0 : Locate 1,7 : Print SP$
Locate 7,7 : Print " CLICK MOUSE TO BEGIN"
MC: C=Mouse Click : If C=0 Then Goto MC
Locate 7,7 : Print SP$
Wait 100
Repeat
Randomize Timer
R=Rnd(3)+1
If R=1 Then VAR$(A)="r" : FLASCOL
If R=2 Then VAR$(A)="y" : FLASCOL
If R=3 Then VAR$(A)="g" : FLASCOL
If R=4 Then VAR$(A)="b" : FLASCOL
For X=0 To A
MPOS
If ARRAY$(X)<>VAR$(X) Then WRONG : Goto AGO
Next X
Wait 60
Inc A
Locate 17,16 : Print A
Until A=SC
For X=1 To 10 : Sam Play 10,1,6000 : Wait 20 : Next X
Locate 3,7 : Print "CONGRATULATIONS. YOU GOT";A;" RIGHT." : Locate 17,16 : Print " " : SC=SC+10 : Wait 200 : Goto AGO
End
AGO:
Locate 1,7 : Print SP$
Locate 3,7 : Paper 1 : Print "yes"; : Paper 0 : Print " DO YOU WANT ANOTHER GO "; : Paper 1 : Print " NO "
M=0
NW:
'X1=X Mouse : Y1=Y Mouse
'Locate 1,1 : Print X1,Y1 : Goto NW
M=Mouse Click
If M=0 Then Goto NW
X1=X Mouse : Y1=Y Mouse
If X1>383 and X1<417 and Y1>99 and Y1<111 Then Cls : End
If X1>151 and X1<176 and Y1>99 and Y1<111 Then Goto STAR
Goto NW
'********************************************************
Procedure FLASCOL
For X=0 To A
If VAR$(X)="r" Then Bell 30 : Colour 3,$F00 : Wait 40 : Colour 3,$A00
If VAR$(X)="y" Then Bell 35 : Colour 6,$FF0 : Wait 40 : Colour 6,$AA0
If VAR$(X)="g" Then Bell 40 : Colour 7,$F0 : Wait 40 : Colour 7,$80
If VAR$(X)="b" Then Bell 45 : Colour 11,$F : Wait 40 : Colour 11,$A
Wait 20
Next X
End Proc
'********************************************************
Procedure MPOS
M=0
MK:
M=Mouse Click
If M=0 Then Goto MK
X1=X Mouse : Y1=Y Mouse
If X1>327 and X1<369 and Y1>154 and Y1<196 Then ARRAY$(X)="y" : Bell 35
If X1>254 and X1<306 and Y1>121 and Y1<145 Then ARRAY$(X)="g" : Bell 40
If X1>194 and X1<231 and Y1>154 and Y1<196 Then ARRAY$(X)="r" : Bell 30
If X1>244 and X1<316 and Y1>209 and Y1<241 Then ARRAY$(X)="b" : Bell 45
End Proc
'********************************************************
Procedure WRONG
Sam Play 13,1,2000
Locate 1,7 : Print " WRONG! CLICK MOUSE TO SEE SEQUENCE "
MC1: C=Mouse Click : If C=0 Then Goto MC1
FLASCOL
End Proc
'********************************************************
Procedure INST
Cls
Print "WHEN THE GAME SCREEN HAS LOADED,PRESS "
Print
Print "THE SPACE BAR TO BEGIN.WATCH THE FOUR"
Print
Print "COLOURS ON THE CONSOLE.ONE OF THEM WILL"
Print
Print "FLASH.USE THE MOUSE POINTER TO POINT ON"
Print
Print "THE COLOUR THAT FLASHED AND PRESS THE"
Print
Print "MOUSE BUTTON.IF YOU GUESSED THE CORRECT"
Print
Print "COLOUR. THE SEQUENCE WILL BEGIN AGAIN"
Print
Print "AND ADD ONE MORE COLOUR TO THE SEQUENCE"
Print
Print "IF YOU GET THE SEQUENCE WRONG,THE GAME"
Print
Print "WILL END AND YOU WILL BE ABLE TO SEE"
Print
Print "THE CORRECT SEQUENCE."
Print
Print
Print " ***** PRESS ANY KEY TO PLAY.*****"
Wait Key
End Proc